require(['./config'],() => {
	require(['request','template','header','footer'],(request,template) =>{
		class Index {
			constructor() {
			   this.gettext() 
			   this.gettextid()
			}
			gettext () {
				request.getText().then(resp => {
					// console.log(resp)
				})
			}
			gettextid(){
				const id = location.search.slice(1)
				console.log(id)
				request.getTextid(id).then(resp => {
					if (resp.code === 200){
						const list  = resp.body.list
						console.log(list[0].tittle)
						$('#explain_right').html(template('explain_Template',{list}))
					}
				})
			}
		}
		new Index ()
	})
	
})